﻿<Window x:Class="ModelViewer.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:wf="clr-namespace:System.Windows.Forms;assembly=System.Windows.Forms"
        xmlns:wfi="clr-namespace:System.Windows.Forms.Integration;assembly=WindowsFormsIntegration"
        xmlns:usercontrols="clr-namespace:ModelViewer"
        TextOptions.TextFormattingMode="Display"
        Title="Kane's Model Viewer" Height="640" Width="820" Loaded="Window_Loaded" Background="White" WindowState="Maximized" Closing="Window_Closing" Drop="Window_Drop" AllowDrop="True">
    <Grid Name="MainGrid" Width="Auto" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Background="#B5000006">
        <Menu Height="23" Name="mainMenu" VerticalAlignment="Top" HorizontalAlignment="Stretch" >
            <MenuItem Header="File" Name="FileMenu">
                <MenuItem Header="Open" Name="btnOpen" Click="btnOpen_Click" ></MenuItem>
                <MenuItem Header="Exit" Name="btnExit" Click="btnExit_Click" />
            </MenuItem>
            <MenuItem Header="View" Name="ViewMenu">
                <MenuItem Header="Wireframe" IsCheckable="True" Name="WireframeMenuItem" Click="WireframeMenuItem_Click" />
                <MenuItem Header="Bounding Box" IsCheckable="True" Name="BoundingBoxMenuItem" IsChecked="False" Click="BoundingBoxMenuItem_Click" />
                <MenuItem Header="Bounding Sphere" IsCheckable="True" Name="BoundingSphereMenuItem" IsChecked="False" Click="BoundingSphereMenuItem_Click" />
                <MenuItem Header="Show FPS" IsCheckable="True" Name="FPSMenuItem" IsChecked="True" Click="FPSMenuItem_Click" />
            </MenuItem>
            <MenuItem Header="Select Mesh" Name="SelectMeshMenu" />
            <MenuItem Header="Developer" Name="DeveloperMenu">
                <MenuItem Header="Generate Exception" IsCheckable="False" Name="DivideByZeroMenuItem" Click="DivideByZeroMenuItem_Click" />
                <MenuItem Header="Load model with missing textures" IsCheckable="False" Name="LoadMissingTextureModelMenuItem" Click="LoadMissingTextureModelMenuItem_Click" />
                <MenuItem Header="Load sample model" IsCheckable="False" Name="LoadSampleModelMenuItem"/>                   
            </MenuItem>
            <MenuItem Header="Help" Name="HelpMenu">
                <MenuItem Header="About"  IsCheckable="False" Name="AboutMenuItem" Click="AboutMenuItem_Click" />
            </MenuItem>
            <Menu.Background>
                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                    <GradientStop Color="Gray" Offset="0.163" />
                    <GradientStop Color="#7F000009" Offset="1" />
                </LinearGradientBrush>
            </Menu.Background>
        </Menu>

        <wfi:WindowsFormsHost Name="windowsFormsHost1" ClipToBounds="True" Margin="3,26,251,137" Background="#7F000000">
        </wfi:WindowsFormsHost>
        
        <Slider Height="23" Name="sldAmbient" Value="1" Maximum="1" ValueChanged="sldAmbient_ValueChanged" Margin="0,29,44,0" HorizontalAlignment="Right" Width="92" VerticalAlignment="Top" />
        <Label Content="Ambient Light" Height="28" Name="label1" Width="100" Margin="0,29,142,0" HorizontalAlignment="Right" VerticalAlignment="Top" />
        <StatusBar Name="statusBar" Height="23" VerticalAlignment="Bottom" Background="#B5000006" Foreground="White">
            <StatusBarItem ClipToBounds="False" Content="Ready" />
        </StatusBar>
        <Label Content="Field of View" Height="28" HorizontalAlignment="Right" Margin="0,63,165,0" Name="label2" VerticalAlignment="Top" />
        <Slider Height="23" HorizontalAlignment="Right" Margin="0,63,43,0" Name="sldFov" VerticalAlignment="Top" Width="93" ValueChanged="sldFov_ValueChanged" />
        <Button HorizontalAlignment ="Right" VerticalAlignment="Top" Name="resetViewButton" Click="btnResetView_Click" ClickMode="Release" Height="23" Padding="8,2,8,2" Margin="0,92,12,0" Foreground="White" UseLayoutRounding="False" >
            Reset View
        </Button>
        <Button HorizontalAlignment ="Right" VerticalAlignment="Top" Name="infoButton" Click="btnInfo_Click" ClickMode="Release" Height="23" Padding="8,2,8,2" Margin="0,121,12,0" Foreground="White" UseLayoutRounding="False" >
            Infomation  
        </Button>
        <Label Content="Label" Height="28" HorizontalAlignment="Right" Margin="0,29,5,0" Name="lblAmbient" VerticalAlignment="Top" />
        <Label Content="Label" Height="28" HorizontalAlignment="Right" Margin="0,58,5,0" Name="lblFov" VerticalAlignment="Top" />
        <Grid Margin="0,0,0,20" Name="grid1" Height="113" VerticalAlignment="Bottom" >
            <TabControl  Name="tabControl1" >
                <TabItem Header="Errors" Name="tabItem1" Margin="-2,-2,-2,-1" Padding="8,2,8,2" >
                    <Grid>
                        <TextBox  Name="textBoxErrors" VerticalScrollBarVisibility="Visible" Background="#FF4A4A4E" />
                    </Grid>
                </TabItem>
            </TabControl>
        </Grid>
        <Popup x:Name="aboutPopup" HorizontalAlignment="Right" PopupAnimation="Fade">
            <usercontrols:AboutWindow />
        </Popup>
        <Border BorderBrush="DimGray" BorderThickness="3" Margin="0,23,0,0" HorizontalAlignment="Left"  Name="modelControlBorder" VerticalAlignment="Top"/>
    </Grid>
</Window>
